package com.sb.money.components;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Form;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.annotations.Symbol;

public class Layout
{
    @Property
    private String pageName;

    @Property
    @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
    private String pageTitle;

    @Property
    @Inject
    @Symbol(SymbolConstants.TAPESTRY_VERSION)
    private String tapestryVersion;

    @Property
    @Inject
    @Symbol(SymbolConstants.APPLICATION_VERSION)
    private String applicationVersion;

    @SuppressWarnings("unused")
    private String javaVersion;

    @Inject
    private ComponentResources resources;

    public String getClassForPageName()
    {
        return resources.getPageName().equalsIgnoreCase(pageName) ? "current_page_item"
                : null;
    }

    public String getJavaVersion() {
        return System.getProperty("java.version");
    }
/*
    @Inject
    @Property
    @SuppressWarnings("unused")
    @Path("context:images/Crystal_Clear_action_1rightarrow.png")
    private Asset nextImage;

    @Inject
    @Path("context:images/Crystal_Clear_action_2rightarrow.png")
    @Property
    @SuppressWarnings("unused")
    private Asset next2Image;

    @Inject
    @Path("context:images/Crystal_Clear_action_1leftarrow.png")
    @Property
    @SuppressWarnings("unused")
    private Asset previousImage;

    @Inject
    @Path("context:images/Crystal_Clear_action_2leftarrow.png")
    @Property
    @SuppressWarnings("unused")
    private Asset previous2Image;

    private String selectedDate;

    public String getSelectedDate() {
        return "2012-10-23";
    }

    Object onActionFromActionLinkNext(String context) {
        return null;
    }

    Object onActionFromActionLinkNext2(String context) {
        return null;
    }

    Object onActionFromActionLinkPrevious(String context) {
        return null;
    }

    Object onActionFromActionLinkPrevious2(String context) {
        return null;
    }*/
}